import { IConfig } from './types'
import prod from './prod'
import test from './test'
import dev from './dev'
let config: IConfig
// #ifdef MP-WEIXIN
const plat = uni.getAccountInfoSync().miniProgram.envVersion
if (plat === 'release') {
  config = prod
} else if (plat === 'trial') {
  config = test
} else {
  config = dev
}
// #endif

// #ifdef H5
if (import.meta.env.MODE === 'production') {
  config = prod
} else if (import.meta.env.MODE === 'test') {
  config = test
} else {
  config = dev
}
// #endif
export default config
